google.load("swfobject", "2.2");

var youTubePlayer${id};

function loadYouTubePlayer${id}() {
	
    var params = ${options};
    var atts = ${attributes};
    swfobject.embedSWF("${playerurl}","${markupid}", "425", "344", "8", null, null, params, atts);
}

function onYouTubePlayerReady( playerId ) {
	youTubePlayer${id} = document.getElementById( "${id}" );
	youTubePlayer${id}.loadVideoById('${movieid}', 0, '${quality}');
	if( ${autoplay} ) {
		youTubePlayer${id}.playVideo();
	}
}

google.setOnLoadCallback(loadYouTubePlayer${id});
